package com.leizi.igym.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 课程表
 * @TableName t_course
 */
@TableName(value ="t_course")
@Data
public class Course implements Serializable {
    /**
     * 课程id
     */
    @TableId(value = "id",type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 课程名
     */
    @TableField(value = "course_name")
    private String courseName;

    /**
     * 课程分类id
     */
    @TableField(value = "category_id")
    private Long categoryId;

    /**
     * 课程对应教练id
     */
    @TableField(value = "trainer_id")
    private Long trainerId;

    /**
     * 课程封面
     */
    @TableField(value = "cover")
    private String cover;

    /**
     * 课程封面
     */
    @TableField(value = "descrip")
    private String descrip;


    /**
     * 课程价格
     */
    @TableField(value = "price")
    private BigDecimal price;

    /**
     * 课程购买量
     */
    @TableField(value = "buy_count")
    private Integer buyCount;

    /**
     * 课程状态，0-未发布，1-已发布
     */
    @TableField(value = "status")
    private Integer status;

    /**
     * 总课时
     */
    @TableField(value = "lesson_num")
    private Integer lessonNum;

    /**
     * 发布时间
     */
    @TableField(value = "publish_time")
    private LocalDateTime publishTime;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    /**
     * 逻辑删除
     */
    @TableField(value = "deleted")
    private Integer deleted;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}